package popcorn.ticket.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import popcorn.ticket.entity.Members;
import popcorn.ticket.entity.MembersExample;
@Repository
public interface MembersMapper {
    long countByExample(MembersExample example);

    int deleteByExample(MembersExample example);

    int deleteByPrimaryKey(Integer memberid);
    
    int deleteByUserid(Integer usersid);
    
    int insert(Members record);

    int insertSelective(Members record);

    List<Members> selectByExample(MembersExample example);

    List<Members> selectByPrimaryKey(Integer memberid);

    int updateByExampleSelective(@Param("record") Members record, @Param("example") MembersExample example);

    int updateByExample(@Param("record") Members record, @Param("example") MembersExample example);

    int updateByPrimaryKeySelective(Members members);

    int updateByPrimaryKey(Members record);
    
    Members selectByUserid(Integer userid);
    
    // 会员积分增加
    int updateMemberIntegerByUserid(@Param("userid") int userid,@Param("integral") double integral,@Param("op") String op);
    
    List<Members> selectByGradeId(Integer gradeid);

}